Google OAuth (optional)URL copied
Vyasa can also use Google OAuth for login if configured. This is fully optional and only activated when client_id and client_secret are set.
Install OAuth dependency (optional):
Copied
pip install "vyasa[auth]"
Copied
[google_oauth]
client_id = "your-google-client-id"
client_secret = "your-google-client-secret"
allowed_domains = ["example.com"] # optional
allowed_emails = ["alice@example.com"] # optional
Environment variables:
VYASA_GOOGLE_CLIENT_ID
VYASA_GOOGLE_CLIENT_SECRET
VYASA_GOOGLE_ALLOWED_DOMAINS (comma-separated)
VYASA_GOOGLE_ALLOWED_EMAILS (comma-separated)
When enabled:
- Login page shows a Continue with Google button.
- Google users are stored in the session with
provider = "google" and their email.
- If
allowed_domains or allowed_emails are set, only matching accounts can sign in.